//
//  ExpViewController.m
//  jang
//
//  Created by lee han on 18/06/2017.
//  Copyright © 2017 lee han. All rights reserved.
//

#import "ExpViewController.h"
#import "networkDefine.h"

@interface ExpViewController ()

@end

@implementation ExpViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [_mWebView.scrollView setScrollEnabled:YES];
    
    NSString *htmls = [NSString stringWithFormat:@"<html> \n"
                       "<head> \n"
                       "<style type=\"text/css\"> \n"
                       "body {font-size:15px;}\n"
                       "</style> \n"
                       "</head> \n"
                       "<body>"
                       "<script type='text/javascript'>"
                       "window.onload = function(){\n"
                       "var $img = document.getElementsByTagName('img');\n"
                       "for(var p in  $img){\n"
                       " $img[p].style.width = '100%%';\n"
                       "$img[p].style.height ='auto'\n"
                       "}\n"
                       "}"
                       "</script>%@"
                       "</body>"
                       "</html>",_mContentText];
    
    [_mWebView loadHTMLString: htmls baseURL:[NSURL URLWithString:URLIMAGE_PRE]];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-( void) viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    [self.navigationItem.backBarButtonItem setTitle:@""];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
